{% extends 'base_login.html' %}
{% load i18n %}

{% block title %}
	<h2>{% trans "Create a new page" %}</h2>
{% endblock %}

{% block main %}
	
	<form name="form" method="post" action="." enctype="multipart/form-data">
	
		<h4>{% trans "Page Name" %}:</h4>
		{% if form.name.errors %}<div class="error">{{ form.name.errors|join:", " }}</div>{% endif %}
		{{ form.name }}
		<br/>
		
		<h4>{% trans "Page Title" %}:</h4>
		{% if form.title.errors %}<div class="error">{{ form.title.errors|join:", " }}</div>{% endif %}
		{{ form.title }}	
		<br/>
		
		<h4>{% trans "Page Link (http://example.greatcoins.com/pages/..)" %}:</h4>
		{% if form.name_link.errors %}<div class="error">{{ form.name_link.errors|join:", " }}</div>{% endif %}
		http://{{ shop.name }}.{{ DEFAULT_DNS }}/pages/{{ form.name_link }}	
		<br/>

		<h4>{% trans "Write your page" %}:</h4>
		{% if form.body.errors %}<div class="error">{{ form.body.errors|join:", " }}</div>{% endif %}
		{{ form.body }}	
		<br/>

		{% if form.visible.errors %}<div class="error">{{ form.visible.errors|join:", " }}</div>{% endif %}
		<h4>{% trans "Visible" %}:{{ form.visible }}</h4>
		<br/>

		<br/>
		<br/>

		<button type="submit" class="large awesome">{% trans "Save" %}</button>
		<a href="{% url web_store_pages %}" class="link_cancel">{% trans "Or Cancel" %}</a>
	</form>

{% endblock %}

{% block menu %}
	{% include 'blog_pages/blog_menu.html' %}
{% endblock %}